<HTML><HEAD><TITLE>squash(+Vars, ++Precision, ++LinLog)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>squash(+Vars, ++Precision, ++LinLog)</H1>
Refine the intervals of Vars by the squashing algorithm.
<DL>
<DT><EM>Vars</EM></DT>
<DD>Collection (a la collection_to_list/2) of variables
</DD>
<DT><EM>Precision</EM></DT>
<DD>Minimum required precision (float)
</DD>
<DT><EM>LinLog</EM></DT>
<DD>Domain splitting method (lin or log)
</DD>
</DL>
<H2>Description</H2>
<P>
   Use the squash algorithm on Vars.  This is a deterministic reduction of
   the intervals of variables, done by searching for domain restrictions
   which cause failure, and then reducing the domain to the complement of
   that which caused the failure.  This algorithm is appropriate when the
   problem has continuous solution intervals (where locate would return many
   adjacent solutions).</P><P>

   Precision is the minimum required precision, i.e. the maximum size of the
   resulting intervals (in either absolute or relative terms).  Note that
   the arc-propagation threshold (set by set_threshold/1,2), needs to be one
   or several orders of magnitude smaller than Precision, otherwise the
   solver may not be able to achieve the required precision.</P><P>

   The LinLog parameter guides the way domains are split.  If it is set to
   <TT>lin</TT> then the split is linear (i.e. the arithmetic mean of the bounds is
   used).  If it is set to <TT>log</TT>, the split is logarithmic (i.e. the geometric
   mean of the bounds is used).  Note that if <TT>log</TT> is used, there will be
   roughly the same number of representable floating point numbers on either
   side of the split, due to the logarithmic distribution of these numbers.</P><P>

   If the intervals of variables at the start of the squashing algorithm are
   known not to span several orders of magnitude, the somewhat cheaper
   linear splitting may be used.  In general, log splitting is recommended.</P>

<H2>See Also</H2>
<A HREF="../../lib/ic/locate-2.html">locate / 2</A>, <A HREF="../../lib/ic/locate-3.html">locate / 3</A>, <A HREF="../../lib/ic/locate-4.html">locate / 4</A>, <A HREF="../../lib/ic/set_threshold-1.html">set_threshold / 1</A>, <A HREF="../../lib/ic/get_threshold-1.html">get_threshold / 1</A>, <A HREF="../../lib/lists/collection_to_list-2.html">lists : collection_to_list / 2</A>
</BODY></HTML>
